﻿/**
 * ...
 * @author George Mavchun
 */

package gui.hug;

import flash.text.TextFormat;
import gui.hug.priv.HUGUserButtonWithIconDisplayState;

class HUGUserButtonWithIcon extends HUGButton
{
	private var comboItemDisplayState : HUGUserButtonWithIconDisplayState;
	private var comboItemOverDisplayState : HUGUserButtonWithIconDisplayState;

	public function new(text : String, width : Float, bgColor : Int, ?textFormat : TextFormat) 
	{
		super("");

		comboItemDisplayState = new HUGUserButtonWithIconDisplayState(text, width, bgColor, textFormat);
		comboItemOverDisplayState = new HUGUserButtonWithIconDisplayState(text, width, HUGColors.VK_BORDER_INNER, textFormat);
		
		setStates();
	}
	
	private function setStates() {
		downState = comboItemOverDisplayState;
		overState = comboItemOverDisplayState;
		upState = comboItemDisplayState;
		hitTestState = comboItemDisplayState;
	}

}